<?
        $results = array();
        require_once('../inc/Orders.php');
        if(isset($_POST['id']))
        {
                $row = $_POST;
                $results = NewOrder($row);
                if($results === true)
                {
                        header("Location: index.php");
                        die();
                }
        }else{
                //$row = GetItem($_REQUEST['id']);
        }
?>


<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Details of User: <?=$row['FirstName']?> <?=$row['LastName']?></title>
    <link rel="stylesheet" type="text/css" href="../inc/bootstrap.css">
    <style type="text/css">
        .error { color: red; }
    </style>
</head>

	<body>
		<? include('../inc/header.php'); ?>
        <div class="container">
                        <? include('../inc/nav.php'); ?>
            <div id="contents">
                
                <dl class="error">
                        <? foreach ($results as $key => $value): ?>
                                                <dt><?=$key?></dt>
                                                <dd><?=$value?></dd>
                                        <? endforeach; ?>
                </dl>
            <form class="form-horizontal" method="post" action="">
            	<input type="hidden" name="id" value="<?=$row['id']?>" />
			Order ID: <input type="text" name="Order_id" id="Order_id" value="" />
			Cost: <input type="text" name="Cost" id="Cost" value="" />
			<input class="btn btn-primary" type="submit" value="Save" />
		</form>
	
	</body>
</html>